//
//  HMseatch.swift
//  swift微博项目
//
//  Created by huodian on 16/9/22.
//  Copyright © 2016年 huodian. All rights reserved.
//

import UIKit

@IBDesignable class HMseatch: UIButton {

   //@IBDesignable 修饰自定义方法可以及时刷新
    class func creatTitleView() -> HMseatch{
        
        let nib = UINib(nibName :"HMsearch", bundle:nil)
        
        let search  = nib.instantiate(withOwner: nil, options: nil).last as! HMseatch
        
        return search
 
    }
    
    override func awakeFromNib() {
        
        self.imageEdgeInsets = UIEdgeInsetsMake(0, 10, 0, 0)
        
        self.titleEdgeInsets = UIEdgeInsetsMake(0, 5, 0, 0)
        
        self.bounds.size.width = UIScreen.main.bounds.size.width
        
        self.layer.cornerRadius = 17
        
        self.layer.masksToBounds = true
        
    }
    
}
